package com.example.dao;

import com.example.entity.decrease;
import java.util.List;
import java.sql.SQLException;

public interface decreaseDao extends Dao {

    // 1. 插入数据
    boolean insertDecreaseData(decrease item) throws SQLException;

    // 2. 获取今日按金额排序的数据
    List<decrease> getTodayDecreaseByAmount() throws SQLException;

    // 3. 获取昨日按金额排序的数据
    List<decrease> getYesterdayDecreaseByAmount() throws SQLException;

    // 4. 获取本周按金额排序的数据
    List<decrease> getThisWeekDecreaseByAmount() throws SQLException;

    // 5. 获取本月按金额排序的数据
    List<decrease> getThisMonthDecreaseByAmount() throws SQLException;

    // 6. 获取今日按百分比排序的数据
    List<decrease> getTodayDecreaseByPercentage() throws SQLException;

    // 7. 获取昨日按百分比排序的数据
    List<decrease> getYesterdayDecreaseByPercentage() throws SQLException;

    // 8. 获取本周按百分比排序的数据
    List<decrease> getThisWeekDecreaseByPercentage() throws SQLException;

    // 9. 获取本月按百分比排序的数据
    List<decrease> getThisMonthDecreaseByPercentage() throws SQLException;

    //  10. 判断该名称是否存在
    boolean existsByName(String name) throws SQLException;
}
